﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Custom;

namespace BizkaiMove
{
    public partial class frmCamara : Form
    {
        public frmCamara()
        {
            InitializeComponent();
        }

        string _URL;

        public void ShowDetail(string URL,string referencia, string derecha, string izquierda)
        {
            lblDerecha.Text = derecha;
            lblIzquierda.Text = izquierda;
            this.Text = referencia;

            _URL = URL;

            this.ShowDialog();
        }

        private void CargaCamara()
        {
            helper.FormDisable(this, "Cargando imagen de camara...");
            pictureBox1.Image = helper.getWebRequestImage(_URL);
            helper.FormEnable(this);
        }

        private void menuItem1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void menuItem2_Click(object sender, EventArgs e)
        {
            CargaCamara();
        }

        private void frmCamara_Load(object sender, EventArgs e)
        {
            CargaCamara();
        }
    }
}